<?php 
use Zend\Db\Adapter\Adapter;
return array(
    /**
     * Database Adapter(s)
     */
    'service_manager' => array(
        'factories' => array(
            /**
             * Adapter One - this factory will use the default 'db' connection
             */
            'Zend\Db\Adapter\Adapter'   => 'Zend\Db\Adapter\AdapterServiceFactory',
            /**
             * Adapter Two - use the second connection
             */
            'Application\Db\AdapterTwo' => function($sm) {
                 $config = $sm->get('Config');
                 return new Adapter($config['db_two']);
             },
        ),
    ),
);